using System.ComponentModel.DataAnnotations.Schema;

namespace Wips.Domain.Models.Authorities.Model
{
    /// <summary>
    /// 角色组与角色关联
    /// </summary>
    [Table("AuthorityRoleGroupRoles")]
    [SugarTable("AuthorityRoleGroupRoles")]
    public class RoleGroupRole : ValueObjectBase
    {
        /// <summary>
        /// 角色组ID
        /// </summary>
        /// <value></value>
        public string RoleGroupId { get; set; }

        /// <summary>
        /// 角色组
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(RoleGroupId))]
        public RoleGroup RoleGroup { get; set; }

        /// <summary>
        /// 角色ID
        /// </summary>
        /// <value></value>
        public string RoleId { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(RoleId))]
        public Role Role { get; set; }
    }
}